package net.freebytes.test;



public class RemoteMonitorInsGene extends InsGene {

    public RemoteMonitorInsGene() {
        setStx("@@".getBytes());
        setEtx("##".getBytes());
    }

    @Override
    public byte[] checkCode() {
        byte[] bytes = new byte[1];
        int sum = 0;
        for (int i = 0;i < ins.length ; i++)
            sum = sum + ins[i];
        bytes[0] = (byte) sum;
        return bytes;
    }

    @Override
    public void escape() {

    }

    public static void main(String[] args) {
        RemoteMonitorInsGene remoteMonitorInsGene = new RemoteMonitorInsGene();
        remoteMonitorInsGene.addHex("6810000000000068110433333433C216");
        byte[] bytes = remoteMonitorInsGene.finalIns();
        System.out.println();

    }
}
